﻿@model WebDKMH.Models.thongbao1
@{
    ViewBag.Title = "dangthongbao";
    Layout = "~/Views/Shared/admin.cshtml";
}

@*<div class="Content-midle-Top-Ten"><h4> ► Đăng thông báo</h4></div>*@
<div class="Main-Content-1">
    <div class="Main-Content-1-Tieude">
        <img src="~/Images/icon_dangky.png" />
        <ul>
            <li>
                <h2>ĐĂNG THÔNG BÁO </h2>
            </li>
        </ul>
    </div>

    <div class="Main-Content-1-Noidung">
        <p></p>
        @using (Html.BeginForm())
        {

            <table>
                <tr>
                    <td class="tieude">
                        Tiêu Đề:

                        @if (Request.QueryString["type"] == "edit")
                        {
                            @Html.TextBoxFor(m => m.tieude)}
                        else
                        {
                            @Html.TextBox("txttieude")}


                        @*Tiêu Đề: @Html.TextBox("txttieude")*@  @*<input type="text" name="" id="" />*@

                    </td>
                </tr>
                <tr>
                    <td>Tin Mới: 
                        @if (Request.QueryString["type"] == "edit")
                        {
                            if(Model.@new==true)
                            { <input type="checkbox" id="moi" name="moi"  checked />}
                            else
                            {<input type="checkbox" id="moi" name="moi"  /> }

                        }
                        else
                        {<input type="checkbox" id="moi" name="moi" /> }
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    Tin DKMH: 
                        @if (Request.QueryString["type"] == "edit")
                            {
                                if (Model.tgdk == true)
                                { <input type="checkbox" id="dkmh" name="dkmh" checked />}
                                else
                                {<input type="checkbox" id="dkmh" name="dkmh" /> }

                            }
                        else
                            {<input type="checkbox" id="dkmh" name="dkmh" /> }
                    </td>
                </tr>
                <tr>
                    <td class="noidung">
                        Nội Dung:
                        <p></p>


                        <textarea name="txtDetail">
                            @if (Request.QueryString["type"] == "edit")
                            {
                                @Html.DisplayFor(m => m.noidung)}

                        </textarea>


                        <input style=" width: 80px; height: 30px; float: left;margin-left :200px;   margin-top: 20px;" name="Insert" type="submit" value="OK" />
                        <a href=@Url.Action("thongbao","admin")><input style=" width: 80px; height: 30px; float: right; margin-right:200px;   margin-top: 20px;" name="Cancel" type="submit" value="Cancel" /></a>

                    </td>
                </tr>

            </table>
        }
    </div>
</div>
<script language="javascript" type="text/javascript">
    var ckeditor;
    function createEditor(languaeCode, id) {
        var editor = CKEDITOR.replace(id, { language: languaeCode });
    }
    $(function () { createEditor('vi', 'txtDetail') });
</script>
